/**
 * GUIHelper.java
 * 
 * @author	Joe Scharnitzke
 * Date: 	Jun 2, 2011
 * 
 * Simply contains static helper methods for use by other modules
 * in the gui package.
 *
 * Change Log:
 * 	06/10/11 10:57 - (v1.0) Release
 * 	Jun 2, 2011 9:35:18 AM - (v0.1) Initial Implementation
 */

package gui;

import java.awt.*;

public class GUIHelper
{
	/**
	 * Positions any Container object in the exact
	 * center of the screen.
	 * 
	 * @param c_to_center the Container to center
	 */
	
	public static void Center(Container c_to_center)
	{
		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
		int x = (int)((dim.getWidth() - c_to_center.getWidth()) / 2);
		int y = (int)((dim.getHeight() - c_to_center.getHeight()) / 2);
		
		c_to_center.setLocation(x, y);
	}
}
